#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Action.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class InputPin;
class StructuralFeature;

/// <summary>
/// StructuralFeatureAction
/// StructuralFeatureAction is an abstract class for all Actions that operate on
/// StructuralFeatures.
/// </summary>
class UMLMODEL_EXPORT StructuralFeatureAction : public Action {

public: // Constructors and destructors
    explicit StructuralFeatureAction(const QString& umlType="uml::StructuralFeatureAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// object getter
    /// The InputPin from which the object whose StructuralFeature is to be read or
    /// written is obtained.
    /// </summary>
    shared_ptr<InputPin> object() const;

    /// <summary>
    /// object setter
    /// The InputPin from which the object whose StructuralFeature is to be read or
    /// written is obtained.
    /// </summary>
    void setObject(shared_ptr<InputPin> value);

    /// <summary>
    /// structuralFeature getter
    /// The StructuralFeature to be read or written.
    /// </summary>
    shared_ptr<StructuralFeature> structuralFeature() const;

    /// <summary>
    /// structuralFeature setter
    /// The StructuralFeature to be read or written.
    /// </summary>
    void setStructuralFeature(shared_ptr<StructuralFeature> value);

private: // Fields
    /// <summary>
    /// object
    /// The InputPin from which the object whose StructuralFeature is to be read or
    /// written is obtained.
    /// </summary>
    shared_ptr<InputPin> object_;

    /// <summary>
    /// structuralFeature
    /// The StructuralFeature to be read or written.
    /// </summary>
    shared_ptr<StructuralFeature> structuralFeature_;

};

} // namespace uml
